<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改球队')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-team-edit" th:object="${sysNbaTeam}">
            <input name="teamId" th:field="*{teamId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">中文名称：</label>
                <div class="col-sm-8">
                    <input name="teamNameCn" th:field="*{teamNameCn}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">英文名称：</label>
                <div class="col-sm-8">
                    <input name="teamNameEn" th:field="*{teamNameEn}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">简写：</label>
                <div class="col-sm-8">
                    <input name="teamNameAab" th:field="*{teamNameAab}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所在城市：</label>
                <div class="col-sm-8">
                    <input name="teamCity" th:field="*{teamCity}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">球馆名称：</label>
                <div class="col-sm-8">
                    <input name="teamGymnasium" th:field="*{teamGymnasium}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">成立时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="teamInception" th:value="${#dates.format(sysNbaTeam.teamInception, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分区：</label>
                <div class="col-sm-8">
                    <input name="teamArea" th:field="*{teamArea}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">教练：</label>
                <div class="col-sm-8">
                    <input name="teamCoach" th:field="*{teamCoach}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">简介：</label>
                <div class="col-sm-8">
                    <input name="teamDesc" th:field="*{teamDesc}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/team";
        $("#form-team-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-team-edit').serialize());
            }
        }

        $("input[name='teamInception']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>